﻿/****************
 * Copyright 2016 Brian Tabone
 * Licensed under the Apache 2.0 License
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * IMessageChannel.cs
 * Defines the SCADA Channel interface
 * 8/8/16
 */

namespace IAO.Common.Interfaces.Networking
{
    public enum ListeningState
    {
        Offline,
        Listening
    }

    public interface IMessageChannel
    {
        /// <summary>
        ///     Host name or IP address where message channel is hosted
        /// </summary>
        string Host { get; }

        /// <summary>
        ///     Port where the REST service is listening
        /// </summary>
        ushort Port { get; }

        /// <summary>
        ///     Get whether this message channel is listening or offline
        /// </summary>
        ListeningState State { get; }

        void StartListening();

        void StopListening();
    }
}